package cjlu.ea.h.service.impl;

import cjlu.ea.h.entity.Byszccl;
import cjlu.ea.h.entity.ByszgshbLsb;
import cjlu.ea.h.entity.OpTime;
import cjlu.ea.h.mapper.OpTimeMapper;
import cjlu.ea.h.service.OpTimeService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author testjava
 * @since 2022-09-11
 */
@Service
@Slf4j
public class OpTimeServiceImpl extends ServiceImpl<OpTimeMapper, OpTime> implements OpTimeService {

    @Override
    public List<OpTime> getConditionLiost(OpTime opTime) {

        QueryWrapper<OpTime> wrapper = new QueryWrapper<>();

        //条件查询
        if(!StringUtils.isEmpty(opTime.getBz())){//功能编号
            wrapper.likeRight("bz",opTime.getBz());
        }

        List<OpTime> list = baseMapper.selectList(wrapper);
        log.info("ServiceImpl--OpTimeList ,查询操作时间数据成功.....");


        return list;

    }
}
